<!DOCTYPE html>
<html xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout" xmlns:th="http://www.thymeleaf.org"
      layout:decorate="~{admin/layout}">
<body>
<div  class="content-wrap" layout:fragment="content">
    <link rel="stylesheet" th:href="@{/layui/css/layui.css}"  media="all">
    <style>
        .input-group .form-control {
            position: relative;
            z-index: 2;
            float: left;
            width: 13%;
            margin-bottom: 0;
        }
        .btn{
            height:35px;
        }
        .layui-form-item .layui-input-inline{
            width: 100px;
        }
        .layui-form-item .layui-form-checkbox {
            margin-top: 0px;
        }
    </style>
    <main id="content" class="content" role="main">
        <ol class="breadcrumb">
            <li>我要搜索</li>
            <li class="active">树种搜索</li>
        </ol>
        <form  th:action="@{/admin/landMass/treeSpecies}" method="post" id="form001">
            <input type="hidden" name="landMass_id" id="landid" >
            <input type="hidden" name="req" id="req" >
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">树种</label>
                    <div class="layui-input-inline">
                        <input type="text"name="treeSpecies" lay-verify="treeSpecies" class="layui-input w100" list="companys" id="search-sz"  th:value="${seektree.treeSpecies}">
                        <datalist id="companys">
                            <option th:each="tree:${tree}" th:value="${tree.treeSpecies}">
                        </datalist>
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">胸径</label>
                    <div class="layui-input-inline" style="width: 50px;">
                        <input type="text" name="chest_min"  class="layui-input" th:value="${seektree.chest_min}">
                    </div>
                    <div class="layui-form-mid">-</div>
                    <div class="layui-input-inline" style="width: 50px;">
                        <input type="text" name="chest_max"   class="layui-input" th:value="${seektree.chest_max}">
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">高度</label>
                    <div class="layui-input-inline" style="width: 50px;">
                        <input type="text" name="height_min"  class="layui-input" th:value="${seektree.height_min}">
                    </div>
                    <div class="layui-form-mid">-</div>
                    <div class="layui-input-inline" style="width: 50px;">
                        <input type="text" name="height_max"  class="layui-input" th:value="${seektree.height_max}">
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">冠幅</label>
                    <div class="layui-input-inline" style="width: 50px;">
                        <input type="text" name="crown_min"  class="layui-input" th:value="${seektree.crown_min}">
                    </div>
                    <div class="layui-form-mid">-</div>
                    <div class="layui-input-inline" style="width: 50px;">
                        <input type="text" name="crown_max"  class="layui-input" th:value="${seektree.crown_max}">
                    </div>
                </div>
                <div class="layui-inline" >
                    <label class="layui-form-label">枝条</label>
                    <div class="layui-input-inline" style="width: 50px;">
                        <input type="text" id="branch_min" name="branch_min"  class="layui-input" th:value="${seektree.branch_min}">
                    </div>
                    <div class="layui-form-mid">-</div>
                    <div class="layui-input-inline" style="width: 50px;">
                        <input type="text" id="branch_max" name="branch_max"  class="layui-input" th:value="${seektree.branch_max}">
                    </div>
                </div>
                <div class="layui-inline">
                    <div class="layui-input-block" style="margin-left: 36px;">
                        <button class="layui-btn"  onclick="sou()" >搜索</button>
                    </div>
                </div>
            </div>
            <script>
                $(function () {
                    if($("#check").val()==1){
                        $("#checkt").attr("checked",true);
                    }
                });
                function sou() {
                    $("#req").val(0);
                    $("#form001").submit();
                }
                $("#cong").click(function () {
                    $("#branch_max").val(null);
                    $("#branch_min").val(null);
                    $("#zhitiao").toggle();
                });
            </script>
        </form>
        <div class="layui-collapse" lay-accordion="">
            <div class="layui-colla-item" th:each="apiSearches :${apiSearches}">
                <h2 class="layui-colla-title">
                    <span  th:id="${apiSearches.landMass_id}" th:text="${apiSearches.serialNumber}"></span>
                </h2>
                <div class="layui-colla-content">
                    <div class="layui-collapse" lay-accordion="">
                        <div class="layui-colla-item" th:each="variety :${apiSearches.varietyList}">
                            <h2 class="layui-colla-title">
                                <span  th:text="${variety.treeSpecies}"></span>
                                <span th:if="${variety.lock>0}">
                                    号苗:<span th:text="${variety.lock}"></span>
                                    <img  class="suod" th:src="@{/img/锁.png}">
                                </span>
                            </h2>
                            <div class="layui-colla-content">
                                <div class="layui-collapse" lay-accordion="">
                                    <div class="layui-colla-item" th:each="search :${variety.apiSearchModels}">
                                        <h2 class="layui-colla-title">
                                            高度：<span class="check" th:text="${search.height}"></span>-
                                            <span class="check" th:text="${search.heightmax}"></span>&nbsp;&nbsp;&nbsp;
                                            胸径：<span class="check"  th:text="${search.chestBreadth}"></span>-
                                            <span class="check"  th:text="${search.chestBreadthmax}"></span>&nbsp;&nbsp;&nbsp;
                                            冠幅：<span class="check"  th:text="${search.crownWidth}"></span>-
                                            <span class="check"  th:text="${search.crownWidthmax}"></span>&nbsp;&nbsp;&nbsp;
                                            数量：<span th:text="${search.quantity}"></span>&nbsp;&nbsp;&nbsp;
                                            <span th:if="${search.clump=='丛生'}">
                                                枝条：<span class="check"  th:text="${search.salenumber}"></span>-
                                                <span class="check"  th:text="${search.salenumbermax}"></span>&nbsp;&nbsp;&nbsp;
                                                丛生
                                            </span>
                                            <span th:if="${search.lock>0}">
                                                号苗:<span th:text="${search.lock}"></span>
                                                <img class="suod" th:src="@{/img/锁.png}">
                                            </span>
                                        </h2>
                                        <div class="layui-colla-content">
                                            <p th:each="trees :${search.trees}">
                                                位置：<span th:text="${trees.place}"></span>&nbsp;&nbsp;&nbsp;
                                                高度：<span class="check" th:text="${trees.height}"></span>-
                                                <span class="check" th:text="${trees.heightmax}"></span>&nbsp;&nbsp;&nbsp;
                                                胸径：<span class="check"  th:text="${trees.chestBreadth}"></span>-
                                                <span class="check"  th:text="${trees.chestBreadthmax}"></span>&nbsp;&nbsp;&nbsp;
                                                冠幅：<span class="check"  th:text="${trees.crownWidth}"></span>-
                                                <span class="check"  th:text="${trees.crownWidthmax}"></span>&nbsp;&nbsp;&nbsp;
                                                <span th:if="${trees.clump=='丛生'}">
                                                    枝条：<span class="check"  th:text="${trees.salenumber}"></span>-
                                                    <span class="check"  th:text="${trees.salenumbermax}"></span>&nbsp;&nbsp;&nbsp;
                                                    丛生
                                                </span>
                                                <span th:if="${trees.clump==true}">从生</span>
                                                <img th:if="${trees.salesState==3}" class="suod" th:src="@{/img/锁.png}">
                                            </p>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <script>
                checknumber();
            </script>
            <script th:src="@{/layui/layui.js}"></script>
            <script>
                layui.use(['element', 'layer'], function(){
                    var element = layui.element;
                    var layer = layui.layer;
                    //监听折叠
                    element.on('collapse(test)', function(data){
                        layer.msg('展开状态：'+ data.show);
                    });
                });
            </script>
        </div>
    </main>
</div>
</body>
</html>